﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ProgrammingSchool.Infrastructure.Constants;

namespace ProgrammingSchool.Models.Account
{
    public class RegistrationModel
    {
        [Required(ErrorMessage = ModelConstants.EmailRequiredMessage)]
        [RegularExpression(ModelConstants.EmailRegExpValidation, ErrorMessage = ModelConstants.EmailNotValid)]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }


        // Todo implement reqular expression validation for password complexity 
        [Required(ErrorMessage = ModelConstants.PasswordRequiredMessage)]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [Compare("Password", ErrorMessage = ModelConstants.PasswordNotConfimed)]
        [DataType(DataType.Password)]
        public string ConfirmPassword { get; set; }

        public RegistrationModel()
        {
        }
    }
}